package version1;

public class Transfer extends Operation {
	private BankDatabase accounts;
	private Screen screen;
	private int currentAccountNumber;
	private Keypad input;

	public Transfer(int currentAccountNumber, Screen screen,
			BankDatabase bankDatabase, Keypad in) {
		this.currentAccountNumber = currentAccountNumber;
		this.screen = screen;
		accounts = bankDatabase;
		input = in;
	}

	@Override
	public void Execute(int valMachine) {
		screen.ShowMessage("Introduza a conta para a qual quer transferir");
		int account = input.ReadInt();
		if (account != currentAccountNumber) {
			screen.ShowMessage("Introduza a conta o valor que deseja transferir");
			int amount = input.ReadInt();
			accounts.tranfer(currentAccountNumber, account, amount);
		}
	}

	/*
	 * operation = new Balance(currentAccountNumber, screen, bankDatabase);
	 */

}
